<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

    <title>
      Graphique
    </title>

    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    
	  <script type="text/javascript">
         google.load('visualization', '1', {packages: ['imagechart']});
    </script>
	
    <script type="text/javascript">
    function drawVisualization() {
	  	
	  var parameters = unescape(window.location.href.slice(window.location.href.indexOf('?') + 1));		
		var json = eval ('(' + parameters + ')');		
		
		console.log(json);
		   	var number = json.length;
        

	  var options = {};
    // In the Chart API, finance chart is considered a line chart
    options.cht = 'lc';
    // set the line colors to transparent
    options.color = '#00000000';
    // create a grid for the chart
    options.chg = '25.0,25.0,4.0,4.0';
    options.chm = 'F,,0,-1,20,0';

    options.width = 1000;
    options.height = 400;
    options.title = "Commit frequency(avg,min,max) in hours per developper";

		      
    dataTable = new google.visualization.DataTable();
    dataTable.addColumn('string');
    dataTable.addColumn('number');
    dataTable.addColumn('number');
    dataTable.addColumn('number');
    dataTable.addColumn('number');
         
		dataTable.addRows(number+2);
		
		dataTable.setValue(0, 0, "");
		dataTable.setValue(0, 1, 0);	
		dataTable.setValue(0, 2, 0);
		dataTable.setValue(0, 3, 0);
		dataTable.setValue(0, 4, 0);
		
		for (var i = 0; i <number; i++){
			dataTable.setValue(i+1, 0, json[i].Nom);
			dataTable.setValue(i+1, 1, json[i].minCommitFreq);	
			dataTable.setValue(i+1, 2, json[i].avgCommitFreq);
			dataTable.setValue(i+1, 3, json[i].avgCommitFreq);
			dataTable.setValue(i+1, 4, json[i].maxCommitFreq);	
		};

		dataTable.setValue(number+1, 0, "");
		dataTable.setValue(number+1, 1, 0);	
		dataTable.setValue(number+1, 2, 0);
		dataTable.setValue(number+1, 3, 0);
		dataTable.setValue(number+1, 4, 0);

            
    var chart = new google.visualization.ImageChart(document.getElementById('visualization'));
    chart.draw(dataTable, options);
	}
      

  google.setOnLoadCallback(drawVisualization);
</script>
	
	
		
  </head>
  
  <body style="font-family: Arial;border: 0 none;">
 
     <div id="visualization" ></div>
  </body>

</html>
​